package com.pearadmin.pro.repository.not.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pearadmin.pro.common.web.base.page.PageResponse;
import com.pearadmin.pro.common.web.base.page.Pageable;
import com.pearadmin.pro.repository.job.domain.SysAnnounce;
import com.pearadmin.pro.repository.job.param.SysAnnounceRequest;
import com.pearadmin.pro.repository.job.SysAnnounceRepository;
import com.pearadmin.pro.repository.not.service.SysAnnounceService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;

/**
 *
 * @author wangxiaozhe
 */
@Service
@SuppressWarnings("unused")
public class SysAnnounceServiceImpl extends ServiceImpl<SysAnnounceRepository, SysAnnounce> implements SysAnnounceService {

    @Resource
    private SysAnnounceRepository sysAnnounceRepository;

    @Override
    public List<SysAnnounce> list(SysAnnounceRequest request) {
        return sysAnnounceRepository.selectAnnounce(request);
    }

    @Override
    public PageResponse<SysAnnounce> page(SysAnnounceRequest request) {
        return Pageable.of(request, (
            ()-> sysAnnounceRepository.selectAnnounce(request)
        ));
    }
}
